Sample Size Atoms
You use sample size atoms to specify the size of each sample in the media. Sample size atoms have an atom type of
'stsz'
.
Figure 0-39
shows the layout of a sample size atom.
Figure 39
The layout of a sample size atom
The sample size atom contains the following data elements.
-
Size
-
A 32-bit integer that specifies the number of bytes in this sample size atom.
-
Type
-
A 32-bit integer that identifies the atom type; this field must be set to
'stsz'
.
-
Version
-
A 1-byte specification of the version of this sample size atom.
-
Flags
-
A 3-byte space for sample size flags. Set this field to 0.
-
Sample size
-
A 32-bit integer specifying the sample size. If all the samples are the same size, this field contains that size value. If this field is set to 0, then the samples have different sizes, and those sizes are stored in the sample size table.
-
Number of entries
-
A 32-bit integer containing the number of entries in the sample size table.
-
Sample size table
-
A table containing the sample size information. The sample size table contains an entry for every sample in the media's data stream. Each table entry contains a size field. The size field contains the size, in bytes, of the sample in question. The table is indexed by sample number--the first entry corresponds to the first sample, the second entry is for the second sample, and so on.
Figure 0-40
shows a sample size table.
Figure 40
An example of a sample size table
© 1997 Apple Computer, Inc.| Previous | Chapter contents | Chapter top | Next |